<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    /**
     * Initialize document type.
     * 
     * @return void
     */
    protected function _initDoctype()
    {
        $this->bootstrap('view');
        $view = $this->getResource('view');
        $view->doctype('XHTML1_STRICT');
    }
    
	protected function _initAutoload()
    {
        $autoloader = new Zend_Application_Module_Autoloader(array(
            'namespace' => 'Plus_',
            'basePath'  => dirname(__FILE__),
        ));
        return $autoloader;
    }
    
    protected function _initLog()
    {
    	//$writer = new Zend_Log_Writer_Firebug();\
    	// TODO: add possibility to turn off log
    	$stream = fopen(APPLICATION_PATH . '/logs/log.txt', 'a', false); // 'w' / 'a' <- append to file
    	if (!$stream) {
    		$stream = 'php://output';
    	}
    	$writer = new Zend_Log_Writer_Stream($stream);
    	$log = new Zend_Log($writer);
    	Zend_Registry::set('log', $log);
    	$log->info('#####');    		
    }
}

